package com.example.graduationdesignbackend.constants;

public enum ResponseCode {
  Success(0, "操作成功"),
  Fail(1, "操作失败"),
  NotFindError(80001, "未查询到信息"),
  SaveError(80002, "保存信息失败"),
  UpdateError(80003, "更新信息失败"),
  DeleteError(800012, "删除信息失败"),
  ValidateError(80004, "数据检验失败"),
  StatusHasValid(80005, "状态已经被启用"),
  StatusHasInvalid(80006, "状态已经被禁用"),
  SystemError(80007, "系统异常"),
  BusinessError(80008, "业务异常"),
  TransferStatusError(80010, "当前状态不正确，请勿重复提交"),
  NotGrant(80011, "没有操作该功能的权限，请联系管理员");

  private Integer code;
  /**
   * 异常信息
   */
  private String name;

  ResponseCode(Integer code, String name) {
    this.code = code;
    this.name = name;
  }


  public Integer getCode() {
    return this.code;
  }

  public void setCode(Integer code) {
    this.code = code;
  }
  public void setName(String name){
    this.name = name;
  }

  public String getName() {
    return this.name;
  }
}
